<template>
	<div class="mainView">
		<!-- 顶部菜单 -->
		<headerView ref="headerView"></headerView>
		<div class="mainView_content">
			<!-- 页面左边空白 -->
			<div class="mainView_content_left"></div>
			<!-- 页面内容区域 -->
			<div class="mainView_content_center">
				<!-- 广告区域 -->
				<adView ref="adView"></adView>
				<!-- 内容区 -->
				<div class="main_content">
					<!-- 内容区左边 -->
					<div class="main_content_left">
						<mainConent ref="mainContent"></mainConent>
					</div>
					<!-- 内容区右边 -->
					<div class="main_content_right" >
						<contentRight ref="contentRight"></contentRight>
					</div>
				</div>
			</div>
			<!-- 页面右边空白 -->
			<div class="mainView_content_right">

			</div>
		</div>
		<!-- 页面底部 -->
		<div class="mainView_footer">
			<footerView ref="footerView"></footerView>
		</div>
	</div>

</template>

<script>
	import headerView from '../header/Headerview.vue'
	import adView from '../ads/MyAdView.vue'
	import mainConent from '../mainContent/content.vue'
	import contentRight from '../mainContent/mainContent_right.vue'
	import footerView from '../footer/Footer.vue'

	export default {
		props: {
			msg: String
		},
		components: {
			headerView,
			adView,
			mainConent,
			contentRight,
			footerView
		},
		data() {
			return {
				type: "homeDetail",
			}
		},
		mounted() {
			
			this.$refs.headerView.showUserInfo();
			this.$refs.mainContent.getChanPing(1);
			uni.$on(this.type, (res) => {
				console.log("111111111111111111111111111111");
				uni.redirectTo({
					url: '../chanping/addChangPing',
				})

			}),
			this.$refs.contentRight.showbtnText("发布产品信息", this.type);

		}


	}
</script>

<style>
	a:hover {
		cursor: pointer;
	}

	.mainView_content {
		display: flex;
		flex-direction: row;
		height: auto;
	}

	.mainView_content_left {
		display: flex;
		height: auto;
		width: 21.5rem;
		background: #f1f2f3;
	}

	.mainView_content_center {
		margin-bottom: 10px;
		flex-direction: column;
		display: flex;
		height: auto;
		width: 75rem;
		background: #FFFFFF;
	}

	/* 内容部分 */
	.main_content {
		display: flex;
		justify-content: space-between;
		height: 100%;
		margin: 0.2rem;

	}

	.main_content_left {
		width: 60rem;
		display: flex;

	}

	.main_content_right {
		display: flex;
		width: 15rem;

	}

	/* 右边内容 */
	.mainView_content_right {
		width: 21.25rem;
		flex-direction: column;
		display: flex;
		height: auto;
		background: #f1f2f3;
	}

	/* 底部 */
	.mainView_footer {
		display: flex;
		height: 10.25rem;
		background-color: #00193A
	}
</style>
